<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多组回调的问题</title>
</head>

<body>
    <script>
        let p = new Promise((resolve, reject) => {
            // reject('error'); // 
        });

        //设置回调
        p.then(v => {
            alert(v);
        }, r => {
            alert(r);
        });

        p.then(v => {
            console.log(v);
        }, r => {
            // error 是 console 的一个方法, 会显示红色的输出
            console.error(r);
        });
    </script>
</body>

</html>